#include "../ItemList.h"
#include "../Skill.h"
#include "../Item.h"
#include "../Spot.h"
#include "../Role.h"

int main()
{
    ItemList<CSkill> skills;
    skills.LoadItems("skills.dat", '#');
    skills.List();
    CSkill &skill = skills[3];
    skill.ShowDetail();

    ItemList<CFood> foods;
    foods.LoadItems("foods.dat", '#');
    foods.List();
    CFood &food = foods[2];
    food.ShowDetail();

    ItemList<CSpot> spots;
    spots.LoadItems("spots.dat", '#');
    spots.List();
    CSpot &spot = spots[1];
    spot.ShowDetail();

    ItemList<CRole> npcs;
    npcs.LoadItems("npcs.dat", '#');
    npcs.List();
    CRole &role = npcs[3];
    CNickData nicks("nick.dat");
    role.UpdateNick(nicks);
    role.ShowDetail();
    role.ShowState();
    role.ShowDetailX(nicks);

    role.AddMoney(1000);
    role.ShowState();
    role.DelMoney(1200);
    role.ShowState();
    return 0;
}
